﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace=" System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="TarreOA.TarreOAModels" %>
<%@ Import Namespace="TarreOA.TarreOABLL" %>

<script runat="server">
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Request.QueryString.Get("thl_id") != null)
            {
                User curLoginUser = (User)Session["user"];
                UserTalkContent utc = UserTalkContent.instance();
                string thl_id = Request.QueryString.Get("thl_id");
                if (utc.TalkContents["Talk" + thl_id] != null && utc.TalkUsers["Talk" + thl_id] != null)
                {
                    List<User> userList = (List<User>)utc.TalkUsers["Talk" + thl_id];
                    List<string> contentList = (List<string>)utc.TalkContents["Talk" + thl_id];
                    userList.Remove(curLoginUser);
                    contentList.Add("[<font color=''><b>" + curLoginUser.UserName + "</b></font>]礼貌的点了点头，开门离去！<font color='#a9a9a9'>["
                        + DateTime.Now.ToString() + "]</font>");
                    utc.TalkUsers["Talk" + thl_id] = userList;
                    utc.TalkContents["Talk" + thl_id] = contentList;  
                }
                ScriptManager.RegisterClientScriptBlock(Page, GetType(), "", "window.parent.location.href='Index.aspx'", true);
            }
        } 
    }
    
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>
